package controller;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import pojo.Food;
import service.FoodManager;

@Controller
public class FoodController {
	@Resource(name="foodManager")
	private FoodManager foodManager;
	
	@ResponseBody
	@RequestMapping(value="/foods", method=RequestMethod.GET)
	public List<Food> showFoodList(String typeId, String m_id){
		List<Food> foodList = foodManager.findByType(typeId, m_id);
		return foodList;
	}
}
